package com.yanqu.road.server.manager.tomb.business;

import com.yanqu.road.server.manager.tomb.dao.*;
import com.yanqu.road.server.manager.tomb.entity.*;

import java.util.List;
import java.util.Map;

public class TombCrossBusiness {

    public static Map<Integer, DbActivityTombInfo> getDbActivityTombInfo(int activityId) {
       return TombActivityInfoDaoImpl.newInstance().getData(activityId);
    }
    public static boolean saveDbActivityTombInfo(DbActivityTombInfo data) {
        return TombActivityInfoDaoImpl.newInstance().saveData(data);
    }


    public static Map<Long, DbTombLog> getDbTombLog(int activityId, String uid, int limit) {
        return TombLogDaoImpl.newInstance().getDataMap(activityId, uid, limit);
    }

    public static boolean saveDbTombLog(DbTombLog data) {
        return TombLogDaoImpl.newInstance().saveData(data);
    }

    public static Map<Integer, Map<Integer, DbTombMaze>>  getDbTombMaze(int activityId) {
        return TombMazeDaoImpl.newInstance().getDataMap(activityId);
    }

    public static boolean saveDbTombMaze(DbTombMaze data) {
        return TombMazeDaoImpl.newInstance().saveData(data);
    }

    public static Map<String, DbTombPosition>  getDbTombPosition(int activityId, int done) {
        return TombPositionDaoImpl.newInstance().getDataMap(activityId, done);
    }

    public static boolean saveDbTombPosition(DbTombPosition data) {
        return TombPositionDaoImpl.newInstance().saveData(data);
    }


    public static List<DbTombServerData> getDbTombServerData(int activityId) {
        return TombServerDataDaoImpl.newInstance().getDataMap(activityId);
    }

    public static boolean saveDbTombServerData(DbTombServerData data) {
        return TombServerDataDaoImpl.newInstance().saveData(data);
    }


    public static Map<Long, DbTombUser>  getDbTombUser(int activityId) {
        return TombUserDaoImpl.newInstance().getDataMap(activityId);
    }

    public static boolean saveDbTombUser(DbTombUser data) {
        return TombUserDaoImpl.newInstance().saveData(data);
    }


    public static Map<Long, DbTombUserPosition>  getDbTombUserPosition(int activityId) {
        return TombUserPositionDaoImpl.newInstance().getDataMap(activityId);
    }

    public static boolean saveDbTombUserPosition(DbTombUserPosition data) {
        return TombUserPositionDaoImpl.newInstance().saveData(data);
    }
}
